import http  from '@/http/index'
//新增
export const addCourseApi = (params:any) => {

    return http.post({
        url: '/api/course',
        method: 'post',
        data:params
    })
}
//列表
export const getListApi = (params:any) => {
    return http.get({
        url: '/api/course/list',
        params: params
    })
}
//编辑
export const editCourseApi = (params:any) =>{
    return http.put({
        url: '/api/course',
        data: params
    })
}
//删除
export const deleteCourseApi = (courseId:any) =>{
    return http.delete({
        url: `/api/course/${courseId}`,
        data: courseId
    })
}
